GtkMenuButton: explicitly protect against recursion
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 23 Jul 2015 12:26:25 +0000 (14:26 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 31 Jul 2015 02:37:53 +0000 (22:37 -0400)
commit65f7fb04ad3cd59ac87ac13a3a59ac18c65c610c
tree6d749944b77fe87780cb46f0d3bcfd7a560e4f1e
parent2550c6a4db0e5427d5c793eb1757acd51642471c
GtkMenuButton: explicitly protect against recursion

The visibility toggling happening on ::click() relied implicitly
on the popover animation, but breaks on disabled animations. The
recursion happening within gtk_toggle_button_set_active() (which
triggers ::clicked when changing state) makes this vfunc to run
again, inverting the visibility of the popover in result.

Fix this by explicitly checking about recursion, we want the
button to be toggled to the right state, but we don't want the
callback running again.

https://bugzilla.gnome.org/show_bug.cgi?id=752577
gtk/gtkmenubutton.c